Skip to content

STM32: allow HS USB endpoints and increase USB OTG_HS endpoints number #13816

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 11, 2020

Conversation

facchinm
Copy link
Contributor

@facchinm facchinm commented Oct 27, 2020

Summary of changes

This is the first part of a PR series to support Arduino Portenta H7 .
The patchset has been split into independent PRs for an easier review.

This PR content:

  1. Allow USB High speed endpoints
  2. Increase USB OTG_HS endpoints number

This two commits can be squashed into one. The PR is independent from PORTENTA_H7 board so it can be mainlined before adding the new target

/cc @pennam @pnndra

Impact of changes

Changes are enabled if :
MBED_CONF_TARGET_USB_SPEED == USE_USB_OTG_HS

Migration actions required

Documentation


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@jeromecoutant


@ciarmcom
Copy link
Member

@facchinm, thank you for your changes.
@jeromecoutant @ARMmbed/mbed-os-core @ARMmbed/mbed-os-maintainers please review.

0xc0170
0xc0170 previously approved these changes Oct 28, 2020
@mergify mergify bot added needs: CI and removed needs: review labels Oct 28, 2020
@0xc0170 0xc0170 added release-type: patch Indentifies a PR as containing just a patch and removed release-type: feature labels Nov 2, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Nov 2, 2020

Set as patch update (target update only)

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 2, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Nov 2, 2020

Jenkins CI Test : ✔️ SUCCESS

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️
jenkins-ci/mbed-os-ci_dynamic-memory-usage ✔️
jenkins-ci/mbed-os-ci_cloud-client-pytest ✔️

Comment on lines +347 to +354
#if (MBED_CONF_TARGET_USB_SPEED != USE_USB_OTG_HS)
/* 1.25 kbytes */
MBED_ASSERT(total_bytes <= 1280);
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering if this total_bytes calculation is really useful...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably it can be avoided, there are a lot of other sanity checks in the endpoint creation phase

Comment on lines +450 to +456
#if (MBED_CONF_TARGET_USB_SPEED == USE_USB_OTG_HS)
{USB_EP_ATTR_ALLOW_ALL | USB_EP_ATTR_DIR_IN_AND_OUT, 0, 0},
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this change can be the default configuration for all?
and then remove #if (MBED_CONF_TARGET_USB_SPEED == USE_USB_OTG_HS) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, but I don't have enough hardware variety to test it 🙂

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 5, 2020

@facchinm Any update to answer questions from review above?

@facchinm
Copy link
Contributor Author

facchinm commented Nov 5, 2020

@facchinm Any update to answer questions from review above?

Yeah, sorry, I lost the notification while tracking #13826 more closely. Will answer immediately

@facchinm
Copy link
Contributor Author

@0xc0170 is any action still needed on my side since @jeromecoutant approved?

@facchinm facchinm force-pushed the patch-stm32-usbhs-pull branch from 38e7d11 to f1ea281 Compare November 10, 2020 16:23
@mergify mergify bot dismissed 0xc0170’s stale review November 10, 2020 16:25

Pull request has been modified.

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 10, 2020

CI restarted

@mbed-ci
Copy link

mbed-ci commented Nov 10, 2020

Jenkins CI Test : ✔️ SUCCESS

Build Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-test ✔️
jenkins-ci/mbed-os-ci_dynamic-memory-usage ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️
jenkins-ci/mbed-os-ci_cloud-client-pytest ✔️

@0xc0170 0xc0170 merged commit e8a3282 into ARMmbed:master Nov 11, 2020
@mergify mergify bot removed the ready for merge label Nov 11, 2020
@mbedmain mbedmain added release-version: 6.5.0 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants